/**
 * 设置缓存
 */
export const setSession = (key, value) => {
  window.sessionStorage.setItem(key, JSON.stringify(value));
};

/**
 * 获取缓存
 * @param {键} key
 * @returns 数据
 */
export const getSession = (key) => {
  const objString = window.sessionStorage.getItem(key);
  return JSON.parse(objString);
};
/**
 * 根据键删除session
 * @param {键} key
 */
export const removeSesion = (key) => {
  sessionStorage.removeItem(key);
};
